<template>
    
        <ul class="item">
            <li class="item-li" v-for="(l,i) in item" :key="i">
               <router-link :to="{name:'details',params:{itemsId:l.itemsId}}">
                    <img :src="l.firstImgUrl" alt="">
                    <p>{{l.title}}</p>
                    <span>¥{{l.price[0]}}</span>
                </router-link>
            </li>
        </ul>
   
</template>
<script>
    export default {
        props:{
            item:[],
        }
    }
    </script>

<style lang="scss" scoped>

.item{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-around;
flex-wrap: wrap;
.item-li{
    margin-top: 5px;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    width: 48%;
    height: 280px;
    img{
        display: block;
        width: 180px;
        height: 180px;
    }
    p{
        color: #212121;
        text-align: center;
        text-overflow: -o-ellipsis-lastline;
        overflow: hidden;				//溢出内容隐藏
        text-overflow: ellipsis;		//文本溢出部分用省略号表示
        display: -webkit-box;			//特别显示模式
        -webkit-line-clamp: 2;			//行数
        line-clamp: 2;					
        -webkit-box-orient: vertical;	//盒子中内容竖直排列
        width: 160px;
        padding: 0px 5px;
    }
    span{
        padding-top: 5px;
        padding-left: 15px;
        color: #ff5687;
        font-size: 18px;
    }
}
}
</style>